package test3.controller;

import org.junit.Test;
import test3.bean.Employee;
import test3.controller.impl.PageControllerImpl;

public class TestPageController {

    private PageController controller=new PageControllerImpl();

    @Test
    public void testShow(){
        System.out.println(controller.showEmployees());
    }

    @Test
    public void testShowPre(){
        controller.showEmployees();
        System.out.println(controller.showNextPage());
        System.out.println(controller.showPrePage());
    }

    @Test
    public void testLoadAndExit(){


        controller.updateOrInsert(new Employee(2,"jia",0,20));
        controller.updateOrInsert(new Employee(3,"qie",1,16));
        controller.updateOrInsert(new Employee(4,"bu",0,18));
        controller.updateOrInsert(new Employee(5,"xiang",0,22));
        controller.updateOrInsert(new Employee(8,"hua",0,22));
        controller.updateOrInsert(new Employee(9,"hh",0,22));

      //  controller.updateOrInsert(new Employee(6,"xia",1,33));
       // controller.updateOrInsert(new Employee(7,"zi",0,22));

        controller.queryById(2);

        controller.delete(3);

        controller.exit();
    }
}
